//
//  WBWebViewController.swift
//  SinaWebo
//
//  Created by 亚杏 on 2017/6/7.
//  Copyright © 2017年 oms. All rights reserved.
//

import UIKit

//网页控制器
class WBWebViewController: WBBaseViewController {

    private lazy var webView = UIWebView(frame: CGRect(x: 0, y: 64, width: UIScreen.cz_screenWidth(), height: UIScreen.cz_screenHeight()))

    var urlStr: String? {
        didSet {
            guard let urlStr = urlStr,
                  let url = URL(string: urlStr)
            else {
                return
            }

            webView.loadRequest(URLRequest(url: url))
        }
    }

    override func setupTableView() {

        navItem.title = "网页"
        view.insertSubview(webView, belowSubview: navigationBar)
        webView.backgroundColor = UIColor.white

    }

}
